#ifndef GAPHICS_ORIENTED_BOUNDING_BOX_H
#define GAPHICS_ORIENTED_BOUNDING_BOX_H

#include "graphics/basic.h"
#include "graphics/bounding_volume.h"

namespace graphics{

class OrientedBoundingBox : public BoundingVolume {
public:
    OrientedBoundingBox(const Vector3 & center) : min_(center), max_(center), center_(center) {}    

    bool Overlaps(const BoundingVolume * other) const;
    bool OverlapWith(const AxisAlignedBoundingBox * other) const;
    bool OverlapWith(const OrientedBoundingBox * other) const;
    bool OverlapWith(const BoundingSphere * other) const ;
    
    const Vector3 GetDimension() const {return max_ - min_;}
    const Vector3 GetHalfDimension() const {return max_ - center_;}

    const Vector3 & GetCenter() const {return center_;}
    const Vector3 & GetMax() const {return max_;}
    const Vector3 & GetMin() const {return min_;}


private:
    Vector3 min_;
    Vector3 max_;
    Vector3 center_;    
};

}

#endif